import { userMgr } from "../../common/api";

Component({
  properties: {
    show: Boolean,
    title: String,
    department: String,
  },

  data: {
    searchShow: true,
    department: '',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClose() {
      this.setData({
        department: '',
      })
    },
    onConfirm() {
      const { department } = this.data;
      console.log(userMgr);
      userMgr.configDemp({
        department
      }).then(res => {
        console.log('终于等到你', res);
      }).catch(err => {
        console.log(err)
      })
    },
    onFocus() {
      wx.navigateTo({
        url: '/pages/select-department/select-department'
      });
    }
  }
})